package com.soft.javase.day11.recursion;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/5/9
 */
public class MonkeyEatPeach {
    public static void main(String[] args) {
        System.out.println("第一天共摘了 " + countPeach(1) + " 个桃子");
    }

    public static int countPeach(int day) {
        if (day == 10) {
            return 1;
        }
        return (countPeach(day + 1) + 1) * 2;
    }
}
